package com.zhiyou.check.service.impl;

import com.zhiyou.check.dao.SingnInDao;
import com.zhiyou.check.pojo.SingnIn;
import com.zhiyou.check.service.SingnInService;
import com.zhiyou.common.pojo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class SingnInServiceImpl implements SingnInService {

    @Autowired
    SingnInDao singnInDao;


    @Override
    public List<SingnIn> findBySid(Integer sid) {
        return singnInDao.findBySid(sid);
    }

    @Override
    public List<SingnIn> findByGidAndByDate(Integer gid, String date) {

        return singnInDao.findByGidAndByDate(gid,date);
    }

    @Override
    public SingnIn findBySidAndByDate(Integer sid, String date) {
        return singnInDao.findBySidAndByDate(sid,date);
    }

    @Override
    public void insertEntryTime(SingnIn singnIn) {
        singnInDao.insertEntryTime(singnIn);
    }

    @Override
    public void updateLeaveSchoolTime(SingnIn singnIn) {
        singnInDao.updateLeaveSchoolTime(singnIn);
    }
}
